package com.ssy.lingxi.platform.manage.repository;

import com.ssy.lingxi.platform.manage.entity.base.ShopRuleDetail;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ShopRuleDetailRepository extends JpaRepository<ShopRuleDetail, Long>, JpaSpecificationExecutor<ShopRuleDetail> {

    List<ShopRuleDetail> findByShopIdAndState(Long shopId, Integer state, Sort sort);

    List<ShopRuleDetail> findByShopIdAndStateAndEnvironment(Long shopId, Integer state, Integer environment, Sort sort);

    List<ShopRuleDetail> findByIdIn(List<Long> maxId);

    Boolean deleteByIdIn(List<Long> collect);
}
